#ifndef MORPHOLOGY_PLUGIN_H
#define MORPHOLOGY_PLUGIN_H

#include "morphology_plugin_global.h"
#include "cvplugininterface.h"
#include <QObject>
#include <QSpinBox>

namespace Ui {
    class PluginGui;
}

class MORPHOLOGY_PLUGINSHARED_EXPORT Morphology_Plugin: public QObject, public CvPluginInterface
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "com.opencv.cvplugininterface")
    Q_INTERFACES(CvPluginInterface)
public:
    Morphology_Plugin();
    ~Morphology_Plugin();

    QString title();
    QString version();
    QString description();
    QString help();
    void setupUi(QWidget *parent);
    void processImage(const cv::Mat &inputImage, cv::Mat &outputImage);

signals:
    void updateNeeded();
    void errorMessage(QString msg);
    void infoMessage(QString msg);

private slots:

    void on_ErodeRadio_toggled(bool checked);

    void on_DilateRadio_toggled(bool checked);

    void on_MorphRadio_toggled(bool checked);

    void on_morphTypesCombo_currentIndexChanged(int index);

    void on_ksizeHspinBox_valueChanged(int arg1);

    void on_ksizeWspinBox_valueChanged(int arg1);

    void on_IterSpin_valueChanged(int arg1);

    void on_morphShapesCombo_currentIndexChanged(int index);

    void openURL(QString url);


private:
    Ui::PluginGui *ui;

};

#endif // MORPHOLOGY_PLUGIN_H
